import request from '@/utils/request'

// 商家登录
export function login(data) {
  return request({
    url: '/TakeOut/LoginBusinessServlet',
    method: 'POST',
    params:{
      businessPhone:parseInt(data.username),
      businessPwd:parseInt(data.password)
    }
  })
}

// 获取所有商家信息
export function getAllBusiness(businessId) {
  return request({
    url: '/TakeOut/GetAllBusinessServlet',
    method: 'POST',
  })
}

// 根据商家id获取商家信息
export function getBusiness(businessId) {
  return request({
    url: '/TakeOut/FindBusinessServlet',
    method: 'POST',
    params:{
      businessId:businessId,
    }
  })
}